package com.lvy.hczn.front.system.domain.business.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lvy.hczn.front.system.domain.business.dto.WarehousingEntryBoxDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
public class WarehousingEntryDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "关联的业务编号")
    private String associatedOrderCode;

    @ApiModelProperty(value = "业务单号类型")
    private String orderType;

    @ApiModelProperty(value = "入库类型：1：采购入库,2：调拨入库,3：销售退货订单入库,4：空箱入库，5：寄存入库，6：采购退贷入库，7：铺货入库，8：补货入库")
    private Integer serviceType;

    @ApiModelProperty(value = "关联的业务编号")
    private String serviceCode;

    /**
     * 入库类型：入库类型：1：采购入库,2：调拨入库,3：销售退货入库,4：空箱入库，5：寄存入库，6：采购退贷入库，7：铺货入库，8：补货入库
     * <p>
     * 出库类型：1：调拨出库,2：销售出库,3：报损出库
     */
    @ApiModelProperty(value = "入库类型：1：采购入库,2：调拨入库,3：销售退货入库,4：空箱入库，5：寄存入库，6：采购退贷入库，7：铺货入库，8：补货入库")
    private Integer type;

    @ApiModelProperty(value = "单据类型:\"CSRK\": \"铺货入库\", \"CGRK\": \"预售补货\"，“XSBH”：\"销售补货\", \"DBRK\": \"调拨入库\",\"DBCK\": \"调拨出库\", \"HSCK\": \"报损出库\", \"QXRK\": \"取消入库\", \"TDRK\": \"退单入库\", \"FHCK\": \"销售发货出库\"")
    private String dataType;

    @ApiModelProperty(value = "货箱编号")
    private String boxCode;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "原料ID")
    private String spuId;

    @ApiModelProperty(value = "原编码")
    private String spuCode;

    @ApiModelProperty(value = "sku")
    private String skuCode;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "规格")
    private String specCode;

    @ApiModelProperty(value = "规格（接口应传的时code，写错了，暂时不改，用id）")
    private String specId;

    @ApiModelProperty(value = "批次编号")
    private String batchCode;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "入库数量")
    private BigDecimal quantity;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "入库重量")
    private BigDecimal weight;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "供应商")
    private String supplierCode;


    @ApiModelProperty(value = "供应商")
    private String supplierId;

    @ApiModelProperty(value = "所属农户")
    private String producerId;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "分拣员名称")
    private String createBy;

    @ApiModelProperty(value = "入库箱数")
    private Integer boxNum;

    @ApiModelProperty(value = "温区id")
    private String temperAreaId;

    /**
     * 商品入库时间
     */
    @JSONField(serialize = false)
    private LocalDateTime createTime;

    /**
     * 采摘时间（生产日期）
     */
    @JSONField(serialize = false)
    private LocalDateTime pickTime;

    @ApiModelProperty(value = "生产日期")
    private LocalDateTime productionDate;

    @ApiModelProperty(value = "入库时间")
    private LocalDateTime storageTime;

    @ApiModelProperty(value = "保质期")
    private Integer shelfLife;

    @ApiModelProperty(value = "保质期")
    private Integer warrantyDate;

    private List<WarehousingEntryBoxDto> entryBoxDtoList;

    @ApiModelProperty(value = "关联箱子异常信息（可以为空）")
    private List<ExceptionBoxDto> entryBoxExpList;

}
